'use strict';
const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';

const RESOURCES = {".git/COMMIT_EDITMSG": "8cf8463b34caa8ac871a52d5dd7ad1ef",
".git/config": "cb4525e38e933e26adf80851af594891",
".git/description": "a0a7c3fff21f2aea3cfa1d0316dd816c",
".git/FETCH_HEAD": "94b9a39a92979d79c83f29263468d415",
".git/HEAD": "4cf2d64e44205fe628ddd534e1151b58",
".git/hooks/applypatch-msg.sample": "ce562e08d8098926a3862fc6e7905199",
".git/hooks/commit-msg.sample": "579a3c1e12a1e74a98169175fb913012",
".git/hooks/fsmonitor-watchman.sample": "a0b2633a2c8e97501610bd3f73da66fc",
".git/hooks/post-update.sample": "2b7ea5cee3c49ff53d41e00785eb974c",
".git/hooks/pre-applypatch.sample": "054f9ffb8bfe04a599751cc757226dda",
".git/hooks/pre-commit.sample": "305eadbbcd6f6d2567e033ad12aabbc4",
".git/hooks/pre-merge-commit.sample": "39cb268e2a85d436b9eb6f47614c3cbc",
".git/hooks/pre-push.sample": "2c642152299a94e05ea26eae11993b13",
".git/hooks/pre-rebase.sample": "56e45f2bcbc8226d2b4200f7c46371bf",
".git/hooks/pre-receive.sample": "2ad18ec82c20af7b5926ed9cea6aeedd",
".git/hooks/prepare-commit-msg.sample": "2b5c047bdb474555e1787db32b2d2fc5",
".git/hooks/push-to-checkout.sample": "c7ab00c7784efeadad3ae9b228d4b4db",
".git/hooks/sendemail-validate.sample": "4d67df3a8d5c98cb8565c07e42be0b04",
".git/hooks/update.sample": "647ae13c682f7827c22f5fc08a03674e",
".git/index": "5481caed3bff104aa176662dde88c3b0",
".git/info/exclude": "036208b4a1ab4a235d75c181e685e5a3",
".git/logs/HEAD": "4059b5db3db4f397cc40dba34b7522d4",
".git/logs/refs/heads/master": "4059b5db3db4f397cc40dba34b7522d4",
".git/logs/refs/remotes/origin/master": "51e73bcd7b7a3b8457335f1d1bac7a11",
".git/objects/05/534b43693dcb6e9046de97b68d446ca86a90ef": "0203d28ae9dfb7fa310bb6f2f9caa56c",
".git/objects/07/74c17c0fa7a7e87e24a6935830998d92b52c75": "cd62ee54b7ceea7b2a7804e69b1d9134",
".git/objects/09/02c033ddb15e8b86992be9e57a6c517547d230": "6ab6cf8605bc68754fb3449562756503",
".git/objects/0f/3ecc32d881ebd8fc31873b3de102a93f939e84": "96e4405af033242fa918e56f771ad12b",
".git/objects/12/156bd76dbe2a394f5e7ef81285ce7930010fd5": "859e07723a140d1b272fc7110bb8d40e",
".git/objects/13/a5715df4a6844066f81825e16050e0b0d74409": "889963538692d636b325e48d8da9da15",
".git/objects/16/5ce0ddf03a820a38f48cba9aa0c9df9b6e6b79": "71df17c95c3124eada62b59e7dabda78",
".git/objects/19/23f14b1b6824eac3d450747c1b19f1ec4cdad6": "3a5bab9b04466b5eaa4770f204629489",
".git/objects/19/49491fe9516a8989f036896a3e154583671459": "c597fc5e3d4267aa11ceba8cade49846",
".git/objects/19/dc13948bbef06f3cbdd6bc3b2d873724d6ecf4": "cdf5ff614d72d8dc82a7bf240586c79c",
".git/objects/1e/727aefc44c39e1197960ea9579a496dc469929": "f822872fb8623c94de480b45c918a3e8",
".git/objects/20/1afe538261bd7f9a38bed0524669398070d046": "82a4d6c731c1d8cdc48bce3ab3c11172",
".git/objects/24/16f8133ed8026ad6fafb38267cd2b2ecdd0d92": "40f9259312fcd4bb49755c7524912d9c",
".git/objects/28/6a99bf050cd8b78869cbc323a3a0c9990829d7": "d551a37fd8b6c9eeb8b459d7dfc2907e",
".git/objects/28/f7f3de8c9697960d11e7012f396f5330d74657": "5485292fe7c0faf3058eab7c6d92e36f",
".git/objects/29/617f4edb7eae1326c61e6e300fc6ae072f3234": "834956e0b4bc0931a75997b07b4e50a6",
".git/objects/2b/ae37718223a0ddc5d246a1aed7731dd7228696": "240a07d42bd1a2f9c4e8757d6a38b4e9",
".git/objects/30/a41e3a250440702f0ef2e645b52662b495b13a": "e251c273346fe9e751faf0bc1e2640a9",
".git/objects/31/9d9c87cb30845ea105bc7c8d4183f167d5612b": "a621f5425b37cc6ed317f1e7ab9d9ce6",
".git/objects/31/d899de0cd2c4824fb4b0d5b01527e9e15562ae": "b1d6632be61d18b2373d1309f62259d6",
".git/objects/32/9ba7cc2a618d197e32f859bbed169faef1a4de": "e8364dfa807a19fb3e3a57d5ba307548",
".git/objects/35/e2af9d156391c065ce296d272e34211fc42c91": "6acdf2c543ba24aaab97b32f8f99fd7d",
".git/objects/38/21d079f6ff8b0a4b16428926ad16bca11f9d10": "10fec6f60609f15fe3d9fa7f5199eb2e",
".git/objects/3d/d03a4337b026a63907364b564c25d747ee5039": "b6ceb6fda0bc4962ff629247b517d816",
".git/objects/46/4ab5882a2234c39b1a4dbad5feba0954478155": "2e52a767dc04391de7b4d0beb32e7fc4",
".git/objects/47/2b1ff5d266503728247fd1affb5e89140f1cd6": "fdbe961bc7447ea40e0304ac37f7de0d",
".git/objects/4a/39079e580dc9be820cba2fae41238c49eaa798": "ada1a19fea32fbb6719120809b9eae60",
".git/objects/4e/18af5b4c91b345acb20f6d0d8e36d37b8f6d99": "6d2ee8f510242a3290346ab14ae189f9",
".git/objects/4f/eb8e4d32fe5a33f7a5a88eafcc6f8380c0ba9f": "c3898952b1e2f468c4159b957b181788",
".git/objects/52/b8f4edcd552daad699bb6c3dd51a16268302ba": "1a59bb6f149e6e4da08e73bee2e69cec",
".git/objects/52/e44f4dc5243ebd7563c3249b754321c2db9d7c": "9b69e4c813fc798a99deb1d74fd4e462",
".git/objects/53/7807567919e88db2866b7825339c57e94c24d8": "970aec5149a3dbe9370a9dc982cdd022",
".git/objects/57/96d6cbd2ad95aec9167869e6e685f342ecc4f0": "dc2d4a5d2ab05bd0847cfe483b90f708",
".git/objects/5a/7b05e1be311772247124911182fda78fde2cec": "d38bfbb93663df272dc4920186bd1040",
".git/objects/5c/5f1440bdaa6d650328f051a6d4262c87af2628": "cdf394c33242ab26356e1e5c0d45972e",
".git/objects/5d/dbb49cf8fa18ea474649191f6bb0a8f1a6deef": "2a4d337b6ea89bbaf749e017e9eda0d7",
".git/objects/5e/6729cf43b5852bfa772754c994e4bd8cec8b31": "7104d7a461c51259854474d3b37f58a0",
".git/objects/60/083723df5cd3985c6406b75ef6050701a39385": "d433ec190f3f83e6e3cd8a9f4d56cd1a",
".git/objects/63/6fd846d378ba719803d6172ce9b26577e07cb0": "758edb04da42f03cd42df882b1ad5a2a",
".git/objects/66/8f57ec7d28c3ae964805e6b95038dbff0faa5f": "dcf7e5f8b5d82b3c98397a05297a13be",
".git/objects/67/2e9e49d2f0c4c8aa44b496beb98f32cb36720e": "8b66be9a4797f8f3922fb5816494c68e",
".git/objects/69/2cd3c746552630c5a0e2c3434210d6a5445f41": "a36d7fad53d3801a4a10ba091d7965d3",
".git/objects/6f/016435f549004c0122ae9ec20972a54faf239d": "8006ce4d47b75c9ad8f6022e75141ab8",
".git/objects/6f/9cad4c116bc8d72e2497226abb5c05ee64982c": "0d104480d68c1652a53721377a02a882",
".git/objects/71/7117947090611c3967f8681ab1ac0f79bca7fc": "ad4e74c0da46020e04043b5cf7f91098",
".git/objects/71/7809363ed19bdd7e1d78f6e421e40a96bc29e3": "9414a3044cb191cc3f57340f57c3dc93",
".git/objects/72/54980d721d40c5e24a247abe3623487df0f125": "0dff239668bba33c459f897aa6f55c40",
".git/objects/75/7e2e61ba2b24b94e30a2490103a4eb09c60ff5": "c886352518f96786dff2e89754449a45",
".git/objects/75/ef7fd00f0946ec92a5b48b6c10c2b43b26f654": "ef49a4a78da5d151e92945bf302a1a8a",
".git/objects/7c/71bbff998f53f7a175e6bcf0e969952e712445": "f592d75a0e1d5c99d59a8f0eee15fdd8",
".git/objects/7d/80b6cfa3c25e270f8184e4f5670a2cca47d91f": "bdc07be2bd6e302b651aea01dc65b2f7",
".git/objects/82/ebd27d5f79d2dbb895141d68df2ffaf2aac22c": "55e80ba2052f042ea907dd4f8647d3e5",
".git/objects/88/cfd48dff1169879ba46840804b412fe02fefd6": "e42aaae6a4cbfbc9f6326f1fa9e3380c",
".git/objects/8a/aa46ac1ae21512746f852a42ba87e4165dfdd1": "1d8820d345e38b30de033aa4b5a23e7b",
".git/objects/8b/f60cad8f13d040b0a8924fae8e5b6c865cf5a7": "911b85b4dd61d736dd81adb8fafc94e5",
".git/objects/8c/8f6cc5df22935535b4df6299de7b6df0bd5285": "1d5abfdd1e1c64a67662578c5be739b2",
".git/objects/8e/7ac78ee34d14c2a2229d396c5d4972b664ea11": "6199dabd0befa87f3b471c86406c4101",
".git/objects/92/9500315caebd2b88c4191173e0c3bfdb5b4846": "6872aa16f455338cf310f7342384df98",
".git/objects/94/bfb1463ad8331bfd687bc751b8920b133da744": "fd2d8c0d844b234856b36b93f652048f",
".git/objects/95/46ad9a43394c5eb964686b30e0bc82654fca4a": "bc133eab95ffe34eb2c3ad130124ffab",
".git/objects/a6/bf3d07576a5f9410d12d26cfc34358c877121e": "3fadc804e174a1f4cc25428357e030ab",
".git/objects/a7/fcd2b47b8a8693bbc16c0817d04c03080a6861": "01bab83ff6cffe2e67f51a338027cda7",
".git/objects/a8/1120454bdb5ee9d82973ec871de582acebfc27": "2e1acc439960da3d93814f09716db6b4",
".git/objects/aa/40566a869084e7d1b46c7dfafa97b678b4c684": "7c0b08a12969138f0041b4d4c07bc610",
".git/objects/af/742adee0a85dd21ea96cbd84182e30e085d6cf": "aa25b932ec40efacb1efe27e7cf25d82",
".git/objects/af/a148c9fa6121df541bdc19a74ea43c4d05fffb": "6eb89651fc91df264cec84c5ecf9ec08",
".git/objects/b2/0b924c22433eefd424f1f03e61541577f8b4f6": "c0c66389db0cffa45d3c4535dfddea77",
".git/objects/b3/cc6c3117acdb6c38a189abfa28d9a0b16e55af": "863d5c82dee9e6fd7639f51291b87ab0",
".git/objects/b5/0254288cc6319d153c4af1d64870d95ee2436f": "468a6506934a07c970a4739eae75eedd",
".git/objects/b7/49bfef07473333cf1dd31e9eed89862a5d52aa": "36b4020dca303986cad10924774fb5dc",
".git/objects/b9/2a0d854da9a8f73216c4a0ef07a0f0a44e4373": "f62d1eb7f51165e2a6d2ef1921f976f3",
".git/objects/bb/befef99573b1e323ac65d9c26a1daf1b809fed": "16c3b8cfb61cb2081b511f2a86761fb3",
".git/objects/bc/82de3f47a7fe2a046ddac7e588c7e0ff7ceb79": "1e89ffc5f6472676c1b3a2bf3f8d317b",
".git/objects/be/adba1f81f783e14e5c945d8f1a528fea8c9983": "77b395ec5ba8c794e50998db9d848c80",
".git/objects/c2/b03fd17256808980a7699e6e45ba4742cc4244": "7d60cb5c3785cfcda42c1c615f70b11a",
".git/objects/c5/f4bc2a4da91586f3005813077f0d0aa9040f82": "3191028b787554cee4652f5050144bff",
".git/objects/c7/7d77ff105e9801553e71cf55fabe4c559d3153": "7ff600fab769f40d5576cd07e98515b0",
".git/objects/c9/d48120a2f7d8af2500fd4fd16467e8b8d99da7": "62f9d0dd0df019d8fbdbc4c858e92933",
".git/objects/d0/fb62af2f15ae022e8b2b41564d7002c18956e7": "633f8d92718a97a320fa0aa1821959e8",
".git/objects/d1/58655cfb84f712bbcf8ddea3e78390f760718a": "009e2c428d451f1ea83999038eea5c12",
".git/objects/d4/3532a2348cc9c26053ddb5802f0e5d4b8abc05": "3dad9b209346b1723bb2cc68e7e42a44",
".git/objects/d5/f639b028d85994ff52cc2b8bb422538e198a75": "53e5fd452c6f206d54a8aed50e833374",
".git/objects/d6/9c56691fbdb0b7efa65097c7cc1edac12a6d3e": "868ce37a3a78b0606713733248a2f579",
".git/objects/d7/2c11112c7cb4e2ce754bc41470f9b829a2d00a": "d7280a766a5d6033f187d874a92b5ad6",
".git/objects/da/8306d5514066759d04264a7d22c05eb6e9bd56": "a93986ff16514fdfede301cdbb5f4bcc",
".git/objects/e1/7321cd115387c63395c750ff8250ade4c9ae6f": "2a2d2d215641eaaef6b7ec13b2395c84",
".git/objects/e6/7e6cdbf2cc25e04ee5d22339c19ee1f764ac83": "080d49d807e835158a468af3d0eeffa4",
".git/objects/e6/b745f90f2a4d1ee873fc396496c110db8ff0f3": "2933b2b2ca80c66b96cf80cd73d4cd16",
".git/objects/e8/2c5850db3a3482d0c954a4dc122c02de555ce7": "d357cd906b3805bf81477f5527cca086",
".git/objects/eb/9b4d76e525556d5d89141648c724331630325d": "37c0954235cbe27c4d93e74fe9a578ef",
".git/objects/ec/877571254f450fdd92ff748b94dbf85f27d69b": "7b4ca5ab8fa5050b1722154d72611975",
".git/objects/ec/a9036f6d5385bc44731ef72234821972416678": "a455f7ff142c54342dba98b3bf4ce13a",
".git/objects/f2/04823a42f2d890f945f70d88b8e2d921c6ae26": "6b47f314ffc35cf6a1ced3208ecc857d",
".git/objects/f2/2eb0dee142254b03b4a6c531bcc5ad36dbb2ff": "74fd4d8ea9c81b2433b1a709158f1d52",
".git/objects/f8/b932bd7f023de65e7ecd5c8f8a38b72b1e64c2": "1a438ca87c1cb7fc7dc86a453c901616",
".git/objects/f8/c338bda62ba4b5cb82160aa38fc8c7abe8842b": "f1d28a3cd65d209339fa2203ba1f1756",
".git/objects/f9/26a8c08ff9691a88cc53acdabaa6cd7ae42d59": "d5da3138163b58f44d9c82aa9bad0563",
".git/objects/fc/160f864ee9aa1ccb4478e63abc23257eff94ab": "ad55be9969d583f7b36f59b70dd872c4",
".git/ORIG_HEAD": "1e5dc3e7b37bdf72bdf11a3cdd2b4dac",
".git/refs/heads/master": "781a3e567dd31d1934d097d7d322fe0f",
".git/refs/remotes/origin/master": "781a3e567dd31d1934d097d7d322fe0f",
"assets/AssetManifest.bin": "b39af00fb72834db2501dbd5e5ea1e90",
"assets/AssetManifest.bin.json": "adcdaa255c2f78f237b3e37abe630f15",
"assets/AssetManifest.json": "e946d6dc72bf240a535e2d852cf79547",
"assets/assets/images/github.svg": "bf24e013ffba62eddccf2313a05135bf",
"assets/assets/images/sweeper/closed.svg": "4181791acf75ff2590a5a80a79e3e878",
"assets/assets/images/sweeper/d0.svg": "647249525b4c1b0ec8a2b347c7972371",
"assets/assets/images/sweeper/d1.svg": "b8fa22e49e2591ac4e7949f895cbfb01",
"assets/assets/images/sweeper/d2.svg": "17ad8bce11740780895dfb4b9de8a69f",
"assets/assets/images/sweeper/d3.svg": "4c907182372479619e4efd7073fce59d",
"assets/assets/images/sweeper/d4.svg": "1fb60ecf69eb3221c0ed803945237096",
"assets/assets/images/sweeper/d5.svg": "2ae24fa391949a92c367f99743780320",
"assets/assets/images/sweeper/d6.svg": "864bb29bc161c118851004009a9906a3",
"assets/assets/images/sweeper/d7.svg": "4acc4e733c6d3e346ad80a7fd705dfff",
"assets/assets/images/sweeper/d8.svg": "0ab31a34dd971008f493c273660973c5",
"assets/assets/images/sweeper/d9.svg": "5fcab9e55b54a4295acc7385c5eb6597",
"assets/assets/images/sweeper/face.svg": "9df452d7713a4c6d431fe0880c52e497",
"assets/assets/images/sweeper/face_active.svg": "d5c974af811506cc8aeac1a10de7ac80",
"assets/assets/images/sweeper/face_lose.svg": "17b17383c71d353c4a496b40307500a0",
"assets/assets/images/sweeper/face_pressed.svg": "c669b22f237201cf69b9cbd5119e01ed",
"assets/assets/images/sweeper/flag.svg": "738f516dd71d610d49d3d9a13945ee98",
"assets/assets/images/sweeper/flag_maybe.svg": "6e63ec9f9c308c18027ddb1129ecbf20",
"assets/assets/images/sweeper/hide.png": "269c30c6469b3fa9d996774983e1bcca",
"assets/assets/images/sweeper/mine.svg": "828f38f3a6fc1f3858f592307dd3f87c",
"assets/assets/images/sweeper/mine_red.svg": "c4640c08ea7568d5099f978fefce2d72",
"assets/assets/images/sweeper/mine_wrong.svg": "9b8f1ddbbf78ac90533705d800923fe3",
"assets/assets/images/sweeper/pressed.png": "bd4ac578ece72dc6990b03a5966c61df",
"assets/assets/images/sweeper/pressed.svg": "8a729b68e32f1f4631d077a3ea8a36c8",
"assets/assets/images/sweeper/type0.svg": "f376c4d29af5ec1cafaf33cce39c397a",
"assets/assets/images/sweeper/type1.svg": "66eb8e995ad3917fd25dfd160e35231b",
"assets/assets/images/sweeper/type2.svg": "f23bf5b2f34f97a97247b184b56922ae",
"assets/assets/images/sweeper/type3.svg": "c4a454b0432dede79a5385bedb134090",
"assets/assets/images/sweeper/type4.svg": "93b74bf3dd59d9fecb086b4f3d6630c4",
"assets/assets/images/sweeper/type5.svg": "e855735ddf54ab1d0cc4c078ed996df2",
"assets/assets/images/sweeper/type6.svg": "38257d32c71993ea3b841e5def68bb60",
"assets/assets/images/sweeper/type7.svg": "a1751c86f6495bf0b990e71dade8edb7",
"assets/assets/images/sweeper/type8.svg": "34760f67a640514165243af734451917",
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57",
"assets/fonts/MaterialIcons-Regular.otf": "4c4008d09d4ed4e71287bf7f28c97a06",
"assets/NOTICES": "bf44187e0f2ee3a8774b9dd9b5dc8ab5",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "89ed8f4e49bcdfc0b5bfc9b24591e347",
"assets/packages/window_manager/images/ic_chrome_close.png": "75f4b8ab3608a05461a31fc18d6b47c2",
"assets/packages/window_manager/images/ic_chrome_maximize.png": "af7499d7657c8b69d23b85156b60298c",
"assets/packages/window_manager/images/ic_chrome_minimize.png": "4282cd84cb36edf2efb950ad9269ca62",
"assets/packages/window_manager/images/ic_chrome_unmaximize.png": "4a90c1909cb74e8f0d35794e2f61d8bf",
"assets/shaders/ink_sparkle.frag": "ecc85a2e95f5e9f53123dcaf8cb9b6ce",
"canvaskit/canvaskit.js": "c86fbd9e7b17accae76e5ad116583dc4",
"canvaskit/canvaskit.js.symbols": "38cba9233b92472a36ff011dc21c2c9f",
"canvaskit/canvaskit.wasm": "3d2a2d663e8c5111ac61a46367f751ac",
"canvaskit/chromium/canvaskit.js": "43787ac5098c648979c27c13c6f804c3",
"canvaskit/chromium/canvaskit.js.symbols": "4525682ef039faeb11f24f37436dca06",
"canvaskit/chromium/canvaskit.wasm": "f5934e694f12929ed56a671617acd254",
"canvaskit/skwasm.js": "445e9e400085faead4493be2224d95aa",
"canvaskit/skwasm.js.symbols": "741d50ffba71f89345996b0aa8426af8",
"canvaskit/skwasm.wasm": "e42815763c5d05bba43f9d0337fa7d84",
"canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b03",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"flutter.js": "c71a09214cb6f5f8996a531350400a9a",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"icons/Icon-maskable-192.png": "c457ef57daa1d16f64b27b786ec2ea3c",
"icons/Icon-maskable-512.png": "301a7604d45b3e739efc881eb04896ea",
"index.html": "38ace7a8ab8e990fe2351348234aecc5",
"/": "38ace7a8ab8e990fe2351348234aecc5",
"LICENSE": "ca1d1ce6df70176d8c0e8e724ea78b3e",
"main.dart.js": "05f60576d6cba7991ff0392186a88f33",
"manifest.json": "1404c37cfecf697c56d77d8f23b48510",
"version.json": "aaf2a0087e5744ed16b1d7ed1919e1b5"};
// The application shell files that are downloaded before a service worker can
// start.
const CORE = ["main.dart.js",
"index.html",
"assets/AssetManifest.bin.json",
"assets/FontManifest.json"];

// During install, the TEMP cache is populated with the application shell files.
self.addEventListener("install", (event) => {
  self.skipWaiting();
  return event.waitUntil(
    caches.open(TEMP).then((cache) => {
      return cache.addAll(
        CORE.map((value) => new Request(value, {'cache': 'reload'})));
    })
  );
});
// During activate, the cache is populated with the temp files downloaded in
// install. If this service worker is upgrading from one with a saved
// MANIFEST, then use this to retain unchanged resource files.
self.addEventListener("activate", function(event) {
  return event.waitUntil(async function() {
    try {
      var contentCache = await caches.open(CACHE_NAME);
      var tempCache = await caches.open(TEMP);
      var manifestCache = await caches.open(MANIFEST);
      var manifest = await manifestCache.match('manifest');
      // When there is no prior manifest, clear the entire cache.
      if (!manifest) {
        await caches.delete(CACHE_NAME);
        contentCache = await caches.open(CACHE_NAME);
        for (var request of await tempCache.keys()) {
          var response = await tempCache.match(request);
          await contentCache.put(request, response);
        }
        await caches.delete(TEMP);
        // Save the manifest to make future upgrades efficient.
        await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
        // Claim client to enable caching on first launch
        self.clients.claim();
        return;
      }
      var oldManifest = await manifest.json();
      var origin = self.location.origin;
      for (var request of await contentCache.keys()) {
        var key = request.url.substring(origin.length + 1);
        if (key == "") {
          key = "/";
        }
        // If a resource from the old manifest is not in the new cache, or if
        // the MD5 sum has changed, delete it. Otherwise the resource is left
        // in the cache and can be reused by the new service worker.
        if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) {
          await contentCache.delete(request);
        }
      }
      // Populate the cache with the app shell TEMP files, potentially overwriting
      // cache files preserved above.
      for (var request of await tempCache.keys()) {
        var response = await tempCache.match(request);
        await contentCache.put(request, response);
      }
      await caches.delete(TEMP);
      // Save the manifest to make future upgrades efficient.
      await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
      // Claim client to enable caching on first launch
      self.clients.claim();
      return;
    } catch (err) {
      // On an unhandled exception the state of the cache cannot be guaranteed.
      console.error('Failed to upgrade service worker: ' + err);
      await caches.delete(CACHE_NAME);
      await caches.delete(TEMP);
      await caches.delete(MANIFEST);
    }
  }());
});
// The fetch handler redirects requests for RESOURCE files to the service
// worker cache.
self.addEventListener("fetch", (event) => {
  if (event.request.method !== 'GET') {
    return;
  }
  var origin = self.location.origin;
  var key = event.request.url.substring(origin.length + 1);
  // Redirect URLs to the index.html
  if (key.indexOf('?v=') != -1) {
    key = key.split('?v=')[0];
  }
  if (event.request.url == origin || event.request.url.startsWith(origin + '/#') || key == '') {
    key = '/';
  }
  // If the URL is not the RESOURCE list then return to signal that the
  // browser should take over.
  if (!RESOURCES[key]) {
    return;
  }
  // If the URL is the index.html, perform an online-first request.
  if (key == '/') {
    return onlineFirst(event);
  }
  event.respondWith(caches.open(CACHE_NAME)
    .then((cache) =>  {
      return cache.match(event.request).then((response) => {
        // Either respond with the cached resource, or perform a fetch and
        // lazily populate the cache only if the resource was successfully fetched.
        return response || fetch(event.request).then((response) => {
          if (response && Boolean(response.ok)) {
            cache.put(event.request, response.clone());
          }
          return response;
        });
      })
    })
  );
});
self.addEventListener('message', (event) => {
  // SkipWaiting can be used to immediately activate a waiting service worker.
  // This will also require a page refresh triggered by the main worker.
  if (event.data === 'skipWaiting') {
    self.skipWaiting();
    return;
  }
  if (event.data === 'downloadOffline') {
    downloadOffline();
    return;
  }
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
  var resources = [];
  var contentCache = await caches.open(CACHE_NAME);
  var currentContent = {};
  for (var request of await contentCache.keys()) {
    var key = request.url.substring(origin.length + 1);
    if (key == "") {
      key = "/";
    }
    currentContent[key] = true;
  }
  for (var resourceKey of Object.keys(RESOURCES)) {
    if (!currentContent[resourceKey]) {
      resources.push(resourceKey);
    }
  }
  return contentCache.addAll(resources);
}
// Attempt to download the resource online before falling back to
// the offline cache.
function onlineFirst(event) {
  return event.respondWith(
    fetch(event.request).then((response) => {
      return caches.open(CACHE_NAME).then((cache) => {
        cache.put(event.request, response.clone());
        return response;
      });
    }).catch((error) => {
      return caches.open(CACHE_NAME).then((cache) => {
        return cache.match(event.request).then((response) => {
          if (response != null) {
            return response;
          }
          throw error;
        });
      });
    })
  );
}
